<?php

class blogComponents extends sfComponents
{
  public function executeBlogroll(sfWebRequest $request)
  {
    $this->links = Doctrine_Core::getTable('BlogRollLink')->getPublishedLinks(
      sfConfig::get('app_blogroll_max_in_sidebar', 10)
    );
  }
  
  public function executeBookmarks(sfWebRequest $request)
  {
    $this->links = Doctrine_Core::getTable('BlogBookmark')->getLastPublishedLinks(
      sfConfig::get('app_bookmarks_max_in_sidebar', 10)
    );
  }
  
  public function executeCategories(sfWebRequest $request)
  {
    $this->categories = Doctrine_Core::getTable('BlogCategory')->
      getPublishedCategories($this->getUser()->getCulture())
    ;
  }
  
  public function executeCategoriesFeedsLinks(sfWebRequest $request)
  {
    $this->categories = Doctrine_Core::getTable('BlogCategory')->
      getPublishedCategories($this->getUser()->getCulture())
    ;
  }
}